package com.yangyang.androidconnect.common;

import android.app.AlertDialog;

import com.yangyang.androidconnect.MyApplication;

public class MessageBox {

    public static void msg( String title, String message) {
        new AlertDialog.Builder(MyApplication.getInstance().getApplicationContext()).setTitle(title).setMessage(message).setPositiveButton("确定", null).show();
    }

    public static void info(String message) {
        new AlertDialog.Builder(MyApplication.getInstance().getApplicationContext()).setTitle("提示").setMessage(message).setPositiveButton("确定", null).show();
    }

    public static void warning(String message) {
        new AlertDialog.Builder(MyApplication.getInstance().getApplicationContext()).setTitle("警告").setMessage(message).setPositiveButton("确定", null).show();
    }

    public static void error( String message) {
        new AlertDialog.Builder(MyApplication.getInstance().getApplicationContext()).setTitle("异常").setMessage(message).setPositiveButton("确定", null).show();
    }
}
